﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="search_round_all.aspx.cs" Inherits="Bus_proj.website.search_round_all" ResponseEncoding="utf-8" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../Styles/Stylebuttoncss.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/textbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 202px;
        }
        .style5
        {
            width: 242px;
        }
        .style6
        {
            width: 174px;
        }
        .style7
        {
            width: 242px;
            height: 26px;
        }
        .style8
        {
            width: 202px;
            height: 26px;
        }
        .style9
        {
            width: 174px;
            height: 26px;
        }
        .style10
        {
            height: 26px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />    
    </Triggers>

<fieldset class="el02">
<legend>ค้นหาเส้นทาง</legend>
    <table class="style1">
        <tr>
            <td align="right" class="style5">
                &nbsp;</td>
            <td class="style3">
                &nbsp;</td>
            <td align="right" class="style6">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label2" runat="server" Text="ชื่อต้นทาง :"></asp:Label>
            </td>
            <td class="style3">
                <asp:TextBox ID="TextBox1" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" class="style6">
                <asp:Label ID="Label4" runat="server" Text="วันที่เดินทาง :"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server" TextMode="Date" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right" class="style7">
                <asp:Label ID="Label3" runat="server" Text="ชื่อปลายทาง :"></asp:Label>
            </td>
            <td class="style8">
                <asp:TextBox ID="TextBox2" runat="server" CssClass="textbox"></asp:TextBox>
            </td>
            <td align="right" class="style9">
                <asp:Label ID="Label5" runat="server" Text="เวลาเดินทาง :"></asp:Label>
            </td>
            <td class="style10">
                <asp:TextBox ID="TextBox4" runat="server" TextMode="Time" CssClass="textbox"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                <asp:Label ID="Label7" runat="server" Text="รหัสเส้นทาง :"></asp:Label>
            </td>
            <td class="style3">
                <asp:DropDownList ID="DropDownList3" runat="server" AppendDataBoundItems="True" 
                    DataSourceID="SqlDataSource1" DataTextField="Around_no" 
                    DataValueField="Around_no" Height="21px" Width="102px" CssClass="textbox">
                    <asp:ListItem Selected="True" Value="0">*เลือก</asp:ListItem>
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:Bus_proConnectionString %>" SelectCommand="select distinct Around_no
from Table_Around"></asp:SqlDataSource>
            </td>
            <td align="right" class="style6">
                <asp:Label ID="Label6" runat="server" Text="ประเภทรถเดินทาง :"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropDownList2" runat="server" Height="21px" Width="122px" 
                    DataSourceID="LinqDataSource2" DataTextField="Type_Bus_name" 
                    DataValueField="Type_Bus_id" AppendDataBoundItems="True" 
                    CssClass="textbox">
                    <asp:ListItem Selected="True" Value="0">*เลือก</asp:ListItem>
                </asp:DropDownList>
                <asp:LinqDataSource ID="LinqDataSource2" runat="server" 
                    ContextTypeName="Bus_proj.DataClasses1DataContext" EntityTypeName="" 
                    TableName="Table_Type_Bus">
                </asp:LinqDataSource>
            </td>
        </tr>
        <tr>
            <td align="right" class="style5">
                &nbsp;</td>
            <td class="style3">
                &nbsp;</td>
            <td align="right" class="style6">
                <asp:Button ID="Button1" runat="server" Height="36px" onclick="Button1_Click" 
                    Text="ค้นหา" Width="110px" CssClass="classname" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</fieldset>

    <asp:Panel ID="Panel1" runat="server" Visible="False">
    <fieldset class="el02">
    <legend>ตารางค้นหาเส้นทาง</legend>
        <table class="style1">
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <asp:GridView ID="GridView1" runat="server" BackColor="White" 
                        BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                        ForeColor="Black" GridLines="Vertical">
                        <AlternatingRowStyle BackColor="White" />
                        <FooterStyle BackColor="#CCCC99" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <RowStyle BackColor="#F7F7DE" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#FBFBF2" />
                        <SortedAscendingHeaderStyle BackColor="#848384" />
                        <SortedDescendingCellStyle BackColor="#EAEAD3" />
                        <SortedDescendingHeaderStyle BackColor="#575357" />
                    </asp:GridView>
                    <br />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        </fieldset>
    </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
